Conversation
...oid/src/main/java/org/matrix/android/sdk/internal/session/room/summary/RoomSummaryUpdater.kt
Outdated
Show resolved
Hide resolved
| if (roomSummaryEntity.isEncrypted && otherRoomMembers.isNotEmpty()) { | ||
| // mmm maybe we could only refresh shield instead of checking trust also? | ||
| crossSigningService.onUsersDeviceUpdate(otherRoomMembers) | ||
| if (aggregator == null) { |
There was a problem hiding this comment.
I struggle to understand why using the aggregator changes something here. Seeing the implementation of onUsersDeviceUpdate, I see we only schedule a worker we should not take so much time, right?
There was a problem hiding this comment.
In the current code, crossSigningService.onUsersDeviceUpdate(otherRoomMembers) is called once per room.
With the new code this is called once per sync response (which can contains many rooms)
There was a problem hiding this comment.
Okay thanks for explaining.
| private val updateUserAccountDataTask: UpdateUserAccountDataTask, | ||
| private val getProfileInfoTask: GetProfileInfoTask, | ||
| @SessionDatabase private val monarchy: Monarchy, | ||
| private val crossSigningService: DefaultCrossSigningService, |
There was a problem hiding this comment.
Why do we inject the DefaultCrossSigningService instead of the interface? Should the interface DeviceListManager.UserDevicesUpdateListener be implemented by CrossSigningService instead?
There was a problem hiding this comment.
The arch is not really clean, we have exception for the crypto code.
BillCarsonFr
left a comment
There was a problem hiding this comment.
LGTM to me.
Maybe we could just do some renaming: We could rename onUsersDeviceUpdate in CrossSigningService in checkTrustAndAffectedRoomShiels.
And this new method would be called by the aggregator when some room membership as changed, and also as a DeviceListManager listener, when the user has some changes in keys (new device, new cross signing...)
...oid/src/main/java/org/matrix/android/sdk/internal/session/room/summary/RoomSummaryUpdater.kt
Outdated
Show resolved
Hide resolved
mnaturel
left a comment
There was a problem hiding this comment.
Could not really test if sync is faster but okay for me.
Thanks. a8eb7d9 |
|
SonarCloud Quality Gate failed. |
|
This is not the same test failing. This time this is:
I am going to merge this PR as the fixes are highly expected. |









Type of change
Content
Improve incremental sync performance by moving some work in the background.
Motivation and context
Fix #6027
A large incr sync is roughly passing from 70s to 8s here.
Screenshots / GIFs
Tests
Tested devices
Checklist